package com.cloud.adrian.novel.resource.service;

import com.cloud.adrian.novel.common.resp.RestResp;
import com.cloud.adrian.novel.resource.dto.resp.ImgVerifyCodeResp;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * @Author: xiangguiliang
 * @version: 1.0
 * @since: 2024/05/24
 */
public interface ResourceService {
    /**
     * 获取图片验证码
     * @return 验证码响应dto
     * @throws IOException 异常
     */
    RestResp<ImgVerifyCodeResp> getImgVerifyCode() throws IOException;

    /**
     * 上传图片
     * @param file 文件
     * @return 图片访问路径
     * @throws IOException 异常
     */
    RestResp<String> uploadImage(MultipartFile file) throws IOException;
}
